#ifndef __PID_H
#define __PID_H

typedef struct
{
    float now, target;
    float Kp;
    float Ki;
    float Kd;
    float error_present, error_previous, error_int;
    float out;
}PID_Structure;

extern float kp, ki, kd;
extern int16_t target;

void PID_StructureInit(PID_Structure *pid_structure, float Kp, float Ki, float Kd);
void PID_Increase_Cal(PID_Structure *pid_structure, float now, float target);
void PID_Target_Cal(PID_Structure *pid_structure, float now, float target);


#endif

